package com.yuanthink.commons.helper;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

import com.yuanthink.commons.cache.ICacheFactory;
/**
 * 
 * @author 06peng
 *
 */
@Component
public class ServiceManager implements InitializingBean {

	private static boolean inited;
	
	public static ICacheFactory cacheFactory;
	
	@Override
	public void afterPropertiesSet() throws Exception {
		inited = true;
	}

	public static boolean isInited() {
		return inited;
	}

	public static ICacheFactory getCacheFactory() {
		return cacheFactory;
	}

	public static void setCacheFactory(ICacheFactory cacheFactory) {
		ServiceManager.cacheFactory = cacheFactory;
	}
}
